<?php
/**
 * Created by PhpStorm.
 * User: YBF
 * Date: 2018/1/14
 * Time: 19:58
 */

namespace app\Controller;

use system\core\Controller;
use system\drive\Db;
use system\lib\WxApi;

defined('WWW_ROOT') or die(header("HTTP/1.1 404 Not Found"));

class indexController extends Controller
{
    /*public $name = 'index';
    public function say()
    {
        $page_name = "this is page name";
        $data['page_name'] = $page_name;
        $user = Db::query('select * from users');
        print_r($user);
        $this->view('index', $data);
    }
    //返回json
    public function jsonArr(){
        return [
            'name' => '样',
            'age' => '12'
        ];
    }
    public function index(){
        $wx = new WxApi();
        $wx->OAuth('',true);
    }*/
    public function index(){
        //$this->view('index',null);
        //$user_list = Db::query('select * from bf_user');
        $user_list = Db::exec("INSERT into bf_user (user_name,user_password,nick_name) VALUES ('站长','12345','哈哈')");
        print_r($user_list);
    }
}